Skip to content

docs: Update Google Sign-In setup and configuration documentation#471

Open
Zfinix wants to merge 12 commits intomainfrom
chore/update-sign-in-with-google-docs
Open

docs: Update Google Sign-In setup and configuration documentation#471
Zfinix wants to merge 12 commits intomainfrom
chore/update-sign-in-with-google-docs

Conversation

@Zfinix
Copy link
Copy Markdown
Contributor

@Zfinix Zfinix commented Apr 21, 2026

Problem

The Sign in with Google docs lacked screenshots for the Google Cloud Console setup steps, had no clear separation between what iOS, Android, and Web each require, and didn't explain key gotchas (YAML indentation, SHA-1 debug vs release mismatch, missing People API). There was also no troubleshooting page and the migration steps were incomplete.

Solution

  • Setup page -- Added 4 screenshots for the People API, Audience, iOS OAuth client, and Android OAuth client creation steps. Added a platform requirements table, step-by-step numbered instructions for each platform, explicit migration commands (serverpod create-migration), Firebase disambiguation note, and warnings for common mistakes.
  • Configuration page -- Added a GoogleIdpConfig parameter reference table with passwords.yaml key column and environment variable equivalents section. Improved link text for accessibility.
  • Troubleshooting page (new) -- Setup checklist and 10 documented failure scenarios with cause and fix for each, including SHA-1 mismatch, redirect_uri_mismatch, missing People API, token expiration on Web, and more.

@Zfinix Zfinix requested a review from Swiftaxe April 21, 2026 08:29
Comment thread docs/06-concepts/11-authentication/04-providers/03-google/01-setup.md Outdated
Comment thread docs/06-concepts/11-authentication/04-providers/03-google/01-setup.md Outdated
Comment thread static/img/authentication/providers/google/6-people-api.png
@Zfinix Zfinix requested a review from Swiftaxe April 27, 2026 09:37
Comment thread docs/06-concepts/11-authentication/04-providers/03-google/01-setup.md Outdated
1. Go to the [Google Cloud Console](https://console.cloud.google.com/).

To implement Google Sign In, you need a Google Cloud project. You can create one in the [Google Cloud Console](https://console.cloud.google.com/).
2. Create a new project (or select an existing one).
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The button for creating a new project could potentially be hard to find. We could either
a. link to the google's own how-to guide for this: https://developers.google.com/workspace/guides/create-project
b. Link directly to the page: https://console.cloud.google.com/projectcreate and add a screenshot and some explanation on what fields to fill in.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think b. is a better option

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then we go with that!

Comment thread docs/06-concepts/11-authentication/04-providers/03-google/01-setup.md Outdated
@Zfinix Zfinix force-pushed the chore/update-sign-in-with-google-docs branch from 597bcee to 3a54bce Compare April 27, 2026 12:59
@Zfinix Zfinix requested a review from Swiftaxe April 27, 2026 13:54
:::warning
**Never commit `config/passwords.yaml` to version control.** It contains your OAuth client secret. Use environment variables or a secrets manager in production.

**Carefully maintain correct indentation for YAML block scalars.** The `googleClientSecret` block uses a `|`; any indentation error will silently break the JSON, resulting in authentication failures.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are two different warnings inside this warning block. Suggestion: maybe separate into two warning blocks or put the YAML block scalar as a ':::note' instead.

1. Go to the [Google Cloud Console](https://console.cloud.google.com/).

To implement Google Sign In, you need a Google Cloud project. You can create one in the [Google Cloud Console](https://console.cloud.google.com/).
2. Create a new project (or select an existing one).
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then we go with that!

Comment thread docs/06-concepts/11-authentication/04-providers/03-google/01-setup.md Outdated
Comment thread docs/06-concepts/11-authentication/04-providers/03-google/01-setup.md Outdated

:::tip
You can use the `GoogleIdpConfigFromPasswords` constructor in replacement of the `GoogleIdpConfig` above to automatically load the client secret from the `config/passwords.yaml` file or environment variables. It will expect the `googleClientSecret` key on the file or the `SERVERPOD_PASSWORD_googleClientSecret` environment variable.
If you need more control over how the client secret is loaded, you can use `GoogleIdpConfig(clientSecret: GoogleClientSecret.fromJsonString(...))` instead. See the [customizations](./customizations) page for details.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think we should move this to "Customizations"?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes we talk about GoogleIdpConfigFromPasswords later down in Add the Google identity provider

Comment thread docs/06-concepts/11-authentication/04-providers/03-google/01-setup.md Outdated
Comment thread docs/06-concepts/11-authentication/04-providers/03-google/01-setup.md Outdated
…structure, including new sections for adding the identity provider and creating endpoints
Skipping the migration will cause the server to crash at runtime when the Google provider tries to read or write user data. More detailed instructions can be found in the general [identity providers setup section](../../setup#identity-providers-configuration).
:::

### Basic configuration options
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trying to simplify the guide. Is this section really needed on this page? It is a bit confusing that it mentions client secret as something required. Could be interpreted that this has to be setup.


```bash
serverpod generate
serverpod create-migration
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like create-migration is not needed, as you said.

Image

### iOS

Create the client credentials in the Google Auth Platform. Navigate to _Clients_ and click _Create Client_. Configure the OAuth client as Application type _**iOS**_.
1. In the Google Auth Platform, navigate to **Clients** and click **Create Client**.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe link this for convenience, in case the user closed the page by now.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They can always easily navigate to this page

Zfinix added 6 commits April 28, 2026 08:02
…eference and adding troubleshooting steps for improved clarity
…ormation and clarifying client secret loading options
…ce of the web OAuth client entry in the `google-services.json` file
…from Google OAuth setup documentation to streamline content
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants